function output = importStartTime(filename, dataLines)
%IMPORTFILE Import data from a text file
%  RECORD = IMPORTFILE(FILENAME) reads data from text file FILENAME for
%  the default selection.  Returns the data as a table.
%
%  RECORD = IMPORTFILE(FILE, DATALINES) reads data for the specified row
%  interval(s) of text file FILENAME. Specify DATALINES as a positive
%  scalar integer or a N-by-2 array of positive scalar integers for
%  dis-contiguous row intervals.
%
%  Example:
%  record = importfile("/home/default/MEGAsync/MSc Sensor Fusion Thesis/Code and Datasets/SHS Code/datasets/marie testing/lopen1.1/lopen1_1/record.properties", [13, 16]);
%
%  See also READTABLE.
%
% Auto-generated by MATLAB on 21-Oct-2020 17:38:10

%% Input handling

% If dataLines is not specified, define defaults
if nargin < 2
    dataLines = [13, Inf];
end

%% Setup the Import Options and import the data
opts = delimitedTextImportOptions("NumVariables", 2);

% Specify range and delimiter
opts.DataLines = dataLines;
opts.Delimiter = " =";

% Specify column names and types
opts.VariableNames = ["Time", "value"];
opts.VariableTypes = ["string", "double"];

% Specify file level properties
opts.ExtraColumnsRule = "ignore";
opts.EmptyLineRule = "read";

% Specify variable properties
opts = setvaropts(opts, "Time", "WhitespaceRule", "preserve");
opts = setvaropts(opts, "Time", "EmptyFieldRule", "auto");

% Import the data
record = readtable(filename, opts);

record.value = datetime(record.value, 'convertfrom', 'posixtime', ...
    'Format', 'MM/dd/yy HH:mm:ss.SSS','TimeZone','Europe/Amsterdam');

output = struct(record{1,1},record{1,2},...
                record{2,1},record{2,2},...
                record{3,1},record{3,2},...
                record{4,1},record{4,2});

            

end